import { NestFactory } from '@nestjs/core';
import {Transport,MicroserviceOptions} from "@nestjs/microservices"
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.createMicroservice<MicroserviceOptions>(
    AppModule,
    {
      transport:Transport.TCP,
      options:{
        // host:'localhost', //自定义ip
        port:8888 //自定义端口
      }
    }
  
  );
  await app.listen();
}
bootstrap();
